# -*- coding: utf-8 -*-

import torchvision


def build_dataset(cfg, transforms=None):
    phase = cfg.PHASE

    dataset = torchvision.datasets.CIFAR10(root=cfg.DATASET.DATA_ROOT_FOLDER,
                                           train=True if phase == "train" else False,
                                           transform=transforms)
    return dataset
